package tk.heimashuma.store.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import tk.heimashuma.store.entity.Car;
import tk.heimashuma.store.entity.Commodity;
import tk.heimashuma.store.entity.Users;

import java.util.List;

public interface CarRepository extends JpaRepository<Car,Integer> {
    Car findAllByUserAndCommodity(Users users, Commodity commodity);
    List<Car> findAllByUser(Users user);
    Long countByUser(Users user);
}
